home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #27 (Dec 87) / Pascal MIDI shell / LSPMIDI next >
Text File  |  1987-07-15  |  3KB  |  108 lines

  1. UNIT LSPMIDI;
  2.  
  3. INTERFACE
  4.     PROCEDURE InitSCCA;
  5.     {call this once at the beginning of your application if you are going to use the}
  6.     {modem port for MIDI}
  7.  
  8.     PROCEDURE TxMIDIA (TheData : integer);
  9.     {use this procedure to transmit a byte of MIDI data through the modem port}
  10.     {the MIDI byte is in the lower 8 bits of the word}
  11.  
  12.     FUNCTION RxMIDIA : LongInt;
  13.     {use this function to get a byte of MIDI data and the counter value associated}
  14.     {with that byte through the modem port}
  15.     {the MIDI byte is in the lower 8 bits of the longword}
  16.     {the upper 3 bytes of the longword contain the counter value when the byte}
  17.     {arrived at the Macintosh}
  18.  
  19.     PROCEDURE MIDIThruA (Thrucode : integer);
  20.     {this is for the MIDI thru function}
  21.     {the Thrucode variable is as follows:}
  22.     {0 = no MIDIThru function}
  23.     {1 = MIDIThru on the same channel}
  24.     {2 = MIDIThru on the opposite channel}
  25.  
  26.     PROCEDURE ResetSCCA;
  27.     {call this procedure when your application is done if you called InitSCCA at}
  28.     {the beginning of your application or the system will crash}
  29.  
  30.     PROCEDURE InitSCCB;
  31.     {call this once at the beginning of your application if you are going to use the}
  32.     {printer port for MIDI}
  33.  
  34.     PROCEDURE TxMIDIB (TheData : integer);
  35.     {use this procedure to transmit a byte of MIDI data through the printer port}
  36.     {the MIDI byte is in the lower 8 bits of the word}
  37.  
  38.     FUNCTION RxMIDIB : LongInt;
  39.     {use this function to get a byte of MIDI data and the counter value associated}
  40.     {with that byte through the printer port}
  41.     {the MIDI byte is in the lower 8 bits of the longword}
  42.     {the upper 3 bytes of the longword contain the counter value when the byte}
  43.     {arrived at the Macintosh}
  44.  
  45.     PROCEDURE MIDIThruB (Thrucode : integer);
  46.     {this is for the MIDI thru function}
  47.     {the Thrucode variable is as follows:}
  48.     {0 = no MIDIThru function}
  49.     {1 = MIDIThru on the same channel}
  50.     {2 = MIDIThru on the opposite channel}
  51.  
  52.     PROCEDURE ResetSCCB;
  53.     {call this procedure when your application is done if you called InitSCCB at}
  54.     {the beginning of your application or the system will crash}
  55.  
  56.     PROCEDURE InitTimer (TimrValue : integer);
  57.     {call this procedure once at the beginning of your application if you are going to}
  58.     {make use of time-stamping.  1 millisecond = decimal 782}
  59.  
  60.     PROCEDURE LoadTimer (TimrValue : integer);
  61.     {call this procedure if you want to change the interval of time that the counter}
  62.     {is incremented.  1 millisecond = decimal 782}
  63.  
  64.     PROCEDURE StartCounter;
  65.     {call this procedure to set the counter value to 1}
  66.  
  67.     FUNCTION GetCounter : LongInt;
  68.     {call this function to get the current value of the counter}
  69.  
  70.     PROCEDURE QuitTimer;
  71.     {call this procedure when your application is done if you called InitTimer at}
  72.     {the beginning of your application or the system will crash}
  73.  
  74. IMPLEMENTATION
  75. {$A+}
  76.     PROCEDURE InitSCCA;
  77.     external;
  78.     PROCEDURE TxMIDIA;
  79.     external;
  80.     FUNCTION RxMIDIA;
  81.     external;
  82.     PROCEDURE MIDIThruA;
  83.     external;
  84.     PROCEDURE ResetSCCA;
  85.     external;
  86.     PROCEDURE InitSCCB;
  87.     external;
  88.     PROCEDURE TxMIDIB;
  89.     external;
  90.     FUNCTION RxMIDIB;
  91.     external;
  92.     PROCEDURE MIDIThruB;
  93.     external;
  94.     PROCEDURE ResetSCCB;
  95.     external;
  96.     PROCEDURE InitTimer;
  97.     external;
  98.     PROCEDURE LoadTimer;
  99.     external;
  100.     PROCEDURE StartCounter;
  101.     external;
  102.     FUNCTION GetCounter;
  103.     external;
  104.     PROCEDURE QuitTimer;
  105.     external;
  106. {$A-}
  107.  
  108. END.